<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <input type="button" value="切换显示" @click="toggleIsShow">
    <p v-if="isShow">大家好，我是凯凯</p>
    <p v-show="isShow">大家好，我是凯凯的弟弟</p>
    <h2 v-if="temperature >= 35">好热</h2>
</div>
<script src="js/vue.js"></script>
<script>
    var app = new Vue({
        el:"#app",
        data: {
            isShow:false,
            temperature:40
        },
        methods:{
            toggleIsShow:function (){
                this.isShow = !this.isShow;
            }
        },
    })
</script>
</body>
</html>